package com.example.server.service.impl;

import com.example.server.mapper.MyUserMapper;
import com.example.server.pojo.MyUser;
import com.example.server.service.MyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MyUserServiceImpl implements MyUserService {
    @Resource
    private MyUserMapper myUserMapper;

    @Override
    public List<MyUser> findAll() {
        return myUserMapper.findAll();
    }

    @Override
    public MyUser findUser(Long id) {
        return myUserMapper.findUser(id);
    }

    @Override
    public int addUser(MyUser myuser) {
        return myUserMapper.addUser(myuser);
    }

    @Override
    public void delUser(int id) {

    }

    @Override
    public void updateUser(MyUser myuser) {

    }

    @Override
    public MyUser login(String username, String password) {
        return myUserMapper.login(username, password);
    }
}
